package com.lambda.cloud.domain;

import com.lambda.cloud.core.annotation.AutoConverter;
import com.lambda.cloud.core.annotation.FieldMapping;
import com.lambda.cloud.core.shared.BaseDTO;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.time.LocalDateTime;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@SuppressFBWarnings("EI_EXPOSE_REP")
@Data
@AutoConverter(
        target = UserEntity.class,
        fieldMappings = {
            @FieldMapping(target = "username", ignore = true),
            @FieldMapping(target = "props", qualifiedByName = "mapToString")
        })
public class UserCreateDTO extends BaseDTO<UserEntity> {
    private String username;
    private LocalDateTime createTime;
    private Map<String, Object> props;
}
